import React from 'react'
import { NavBar, Tabs } from 'react-vant';
import { useNavigate } from 'react-router-dom'
const Index: React.FC = () => {
  const navigate = useNavigate()
  
  // const items = Array.from({ length: 4 }, (_, i) => i + 1)
  const items = ['待办事项', '我的问诊', '顾问服务', '商家服务'];
  return (
    <div>
      <NavBar
        title="我的诊室"
        leftText="返回"
        rightText="信息"
        onClickLeft={() => navigate(-1)}
        onClickRight={() => navigate('xinxi')}
      />
      <div>
        <Tabs type='card'>
          {items.map(item => (
            <Tabs.TabPane key={item} title={`${item}`}>
              {item}
            </Tabs.TabPane>
          ))}
        </Tabs>
      </div>

    </div>
  )
}

export default Index